<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@page import="utility.connections" %>
<%! String home="",bando="",tipo="";%>
<%  
		
			if (session.getAttribute("user")==null)
			response.sendRedirect("loginerr.jsp");
			
			else
			{
	
			String user = session.getAttribute("user").toString();
			String type = session.getAttribute("type").toString();
			String matr = session.getAttribute("matricola").toString();
			String nome = session.getAttribute("nome").toString();
			String cogn = session.getAttribute("cognome").toString();
			       tipo = session.getAttribute("tipologia").toString();
			
			if(tipo.equalsIgnoreCase("1"))
				{	home = "home_amministratore.jsp";
					bando = "";
				}
			if(tipo.equalsIgnoreCase("2"))
				{	home = "home_amministrativo.jsp"; 
					bando = "<br><input type = \"submit\" name = \"button\" style=\"width: 300px;\""
					      + "value = \"BANDO\" onclick = \"location.href=\"'bando.jsp'\"/></br>";
				}
			}
%>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>GESTIONE BENI</title>
<style type="text/css">
<!--
.style1 {font-family: Verdana, Calibri, Cambria}
.style3 {font-family: Verdana, Calibri, Cambria; font-size: small; }
.style4 {
	font-family: Verdana, Calibri, Cambria;
	font-weight: bold;
	font-style: italic;
	color: #FFFFFF;
}
body {
	background-color: #CCCCCC;
}
-->
</style>
</head>

<body>
<table width="700" height="422" border="0" align="center">
  <tr>
    <td align="center" valign="middle"><img src="images/title.png" width="700" height="100"></td>
  </tr>
  <tr>
    <td height="257" align="center" valign="top"><table width="100%" border="0">
      <tr>
        <td align="center"><div align="left">
          <p class="style3">
		  </p>
        </div></td>
        </tr>
      <tr>
        <td class="style1"><p align="center"><strong>SELEZIONA UN OPZIONE</strong></p></td>
        </tr>
      <tr>
        <td class="style1"><div align="center">
			<br><input type = "submit" name = "button"  style="width: 300px;" 	value = "VISUALIZZA ELENCO"
			 	 onclick = "location.href='elenco_stanze.jsp?order=1'"  />
			<br><input type = "submit" name = "button"   style="width: 300px;" 	value = "GESTIONE BENI" 
				 onclick = "location.href='gestione_beni.jsp'" />
			<br><input type = "submit" name = "button" style="width: 300px;"  	value = "BENI DISPONIBILI"
				 onclick = "location.href='beni_disponibili.jsp'"/>
			<br><input type = "submit" name = "button" style="width: 300px;"   	value = "GESTIONE CATEGORIE"
				 onclick = "location.href='gestione_categorie.jsp'"/>
			<br><input type = "submit" name = "button" style="width: 300px;"   	value = "GESTIONE FORNITORI"
			     onclick = "location.href='gestione_fornitori.jsp'"/>
			<%out.println(bando);%>
		    <br><input type = "submit" name = "button" style="width: 300px;"   	value = "HOME"
			     onclick = "location.href='<%=home%>'"/>
        </div></td>
        </tr>
      <tr>
        <td class="style1">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="middle" bgcolor="#000099"><div align="right" class="style4">GESTIONE STANZE  </div></td>
  </tr>
</table>
</body>
</html>
